package com.bawei.property.api

import com.bawei.network.HttpInterceptorType
import com.bawei.network.HttpManager
import com.bawei.network.TokenInterceptorApiServer
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object TokenApiModule {

    @Provides
    @Singleton
    fun getTokenApiServer(): PropertyApiServer{
        return HttpManager.createApi(PropertyApiServer::class.java, HttpInterceptorType.TOKEN)
    }

}
//
//@Module
//@InstallIn(SingletonComponent::class)
//object SignApiModule {
//
//    @TokenInterceptorApiServer
//    @Provides
//    fun getSignApiServer(): PropertyApiServer{
//        return HttpManager.createApi(PropertyApiServer::class.java, HttpInterceptorType.SIGN)
//    }
//
//}
//
//@Module
//@InstallIn(SingletonComponent::class)
//object UploadApiModule {
//
//    @TokenInterceptorApiServer
//    @Provides
//    fun getUploadApiServer(): PropertyApiServer{
//        return HttpManager.createApi(PropertyApiServer::class.java, HttpInterceptorType.UPLOAD)
//    }
//}
//
//@Module
//@InstallIn(SingletonComponent::class)
//object CommonApiModule {
//    @TokenInterceptorApiServer
//    @Provides
//    fun getCommonApiServer(): PropertyApiServer{
//        return HttpManager.createApi(PropertyApiServer::class.java, HttpInterceptorType.INTERFACE)
//    }
//}

